/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package client;

import entities.GameObject;
import entities.Property;
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.JPanel;

/**
 *
 * @author casshern
 */
public class BottomPanel extends JPanel {

    private BuyAndHire buyAndHire;
    private Information information;
    private WorldPanel worldPanel;
    private Status status;
    private Client client;

    public BottomPanel(Client client) {
        this.client = client;
        this.setPreferredSize(new Dimension(1000, 130));
        buyAndHire = new BuyAndHire(this.client);
        buyAndHire.setBottomPanel(this);
        status = new Status(client.getID());
        information = new Information();
        this.add(buyAndHire);
        this.add(status);
        this.add(information);
        this.setBackground(Color.DARK_GRAY);
    }

    public void setWorldPanel(WorldPanel worldPanel) {
        this.worldPanel = worldPanel;
        buyAndHire.setWorldPanel(worldPanel);
    }

    public void showObjInfo(GameObject obj) {
        status.showObjInfo(obj);
    }

    public void statusUpdate(Property property) {
        status.statusUpdate(property);
    }

    public void showGameInfo() {
        status.showGameInfo();
    }

    public void buttonRelease() {
        buyAndHire.buttonRelease();
    }

    public void setMessage(String text) {
        information.setMessage(text);
    }
}
